<?php

/**
 * AccountCard form base class.
 *
 * @package    wifilez
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseAccountCardForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'account_card_id' => new sfWidgetFormInputHidden(),
      'account_id'      => new sfWidgetFormInput(),
      'nickname'        => new sfWidgetFormInput(),
      'first_name'      => new sfWidgetFormInput(),
      'last_name'       => new sfWidgetFormInput(),
      'card_number'     => new sfWidgetFormInput(),
      'card_exp_month'  => new sfWidgetFormInput(),
      'card_exp_year'   => new sfWidgetFormInput(),
      'card_type'       => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'account_card_id' => new sfValidatorPropelChoice(array('model' => 'AccountCard', 'column' => 'account_card_id', 'required' => false)),
      'account_id'      => new sfValidatorInteger(array('required' => false)),
      'nickname'        => new sfValidatorString(array('max_length' => 64, 'required' => false)),
      'first_name'      => new sfValidatorString(array('max_length' => 64, 'required' => false)),
      'last_name'       => new sfValidatorString(array('max_length' => 64, 'required' => false)),
      'card_number'     => new sfValidatorNumber(array('required' => false)),
      'card_exp_month'  => new sfValidatorNumber(array('required' => false)),
      'card_exp_year'   => new sfValidatorNumber(array('required' => false)),
      'card_type'       => new sfValidatorString(array('max_length' => 16, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('account_card[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AccountCard';
  }


}
